Colin Walters [Fri, 18 Mar 2016 20:52:10 +0000 (16:52 -0400)]
libglnx porting: Use glnx_set_error_from_errno
:warning: There is a notable spiked pit trap here around
`posix_fallocate()` and `errno`. This has bit other projects,
see e.g.
https://github.com/systemd/systemd/commit/
7bb87460e691d30c1a7fd23a1a8240776957e05f
Otherwise the port was straightforward.
Colin Walters [Fri, 18 Mar 2016 20:46:42 +0000 (16:46 -0400)]
Use GSubprocess instead of GSSubprocess (libgsystem removal)
Since we hard-depend on GLib 2.40, we can start using GSubprocess.
This is part of dropping our dependency on libgsystem, which is
deprecated in favor of libglnx (as well as migrating things to GLib).
Colin Walters [Wed, 23 Mar 2016 13:42:17 +0000 (09:42 -0400)]
admin-switch: Add missing reboot argument
Spotted by jlebon in https://github.com/GNOME/ostree/pull/211
Simon McVittie [Fri, 11 Mar 2016 08:46:27 +0000 (08:46 +0000)]
test-libarchive: fix underlinking
Signed-off-by: Simon McVittie <smcv@debian.org>
Simon McVittie [Fri, 11 Mar 2016 09:09:48 +0000 (09:09 +0000)]
Skip test_libarchive_ignore_device_file if we cannot write xattrs
The test tries to get a filesystem that supports xattrs by writing
to /var/tmp, but in some automated build environments the entire
build chroot is on a tmpfs.
Signed-off-by: Simon McVittie <smcv@debian.org>
Simon McVittie [Sat, 19 Mar 2016 17:54:38 +0000 (17:54 +0000)]
tests/admin-test.sh: add #!/bin/sh
This is executable and appears to be intended to be executed directly,
so it should have a #! line.
Colin Walters [Mon, 21 Mar 2016 16:53:40 +0000 (12:53 -0400)]
mkdocs: Fix the site name
Colin Walters [Mon, 21 Mar 2016 14:37:38 +0000 (10:37 -0400)]
deploy: Handle a read-only /boot
I'd like to encourage people to make OSTree-managed systems more
strictly read-only in multiple places. Ideally everywhere is
read-only normally besides `/var/`, `/tmp/`, and `/run`.
`/boot` is a good example of something to make readonly. Particularly
now that there's work on the `admin unlock` verb, we need to protect
the system better against things like `rpm -Uvh kernel.rpm` because
the RPM-packaged kernel won't understand how to do OSTree right.
In order to make this work of course, we *do* need to remount `/boot`
as writable when we're doing an upgrade that changes the kernel
configuration. So the strategy is to detect whether it's read-only,
and if so, temporarily mount read-write, then remount read-only when
the upgrade is done.
We can generalize this in the future to also do `/etc` (and possibly
`/sysroot/ostree/` although that gets tricky).
One detail: In order to detect "is this path a mountpoint" is
nontrivial - I looked at copying the systemd code, but the right place
is to use `libmount` anyways.
Colin Walters [Thu, 17 Mar 2016 01:39:06 +0000 (21:39 -0400)]
manual: Migrate related projects wiki page into manual
This content currently lives here:
<https://wiki.gnome.org/Projects/OSTree/RelatedProjects>. Moving it
into the manual in Markdown:
- Makes it look better
- It's more useful alongside the rest of the docs
- Is much less crummy in general than the GNOME wiki
Alexander Larsson [Fri, 18 Mar 2016 09:00:58 +0000 (10:00 +0100)]
Don't fail "ostree remote refs" if writing the summary cache is not permitted
It used to be allowed to run something like "ostree remote refs" on
a read-only (e.g. system) repo. However, the summary cache caused that to
break. This commit just makes it not save the cache if we get some kind
of permission error when writing it. It'll still work, even without the
cache.
https://bugzilla.gnome.org/show_bug.cgi?id=763855
Colin Walters [Thu, 17 Mar 2016 15:22:25 +0000 (11:22 -0400)]
libglnx porting: gs_transfer_out_value -> g_steal_pointer
It's a bit more verbose but...eh.
Colin Walters [Thu, 17 Mar 2016 15:02:48 +0000 (11:02 -0400)]
libglnx porting: xattr calls
These are straightforward as the libgsystem versions were already just
equivalent shims.
Colin Walters [Thu, 17 Mar 2016 14:19:12 +0000 (10:19 -0400)]
libglnx porting: gs_free -> g_autofree
There were surprisingly few uses left.
Colin Walters [Thu, 17 Mar 2016 14:17:47 +0000 (10:17 -0400)]
libglnx porting: gs_fd_close -> glnx_fd_close
I'd like to eventually kill libgsystem.
Colin Walters [Fri, 18 Mar 2016 12:43:53 +0000 (08:43 -0400)]
tests: Strengthen test tmpdir sanity check, be compat with ginsttest saving
GNOME Continuous uses ginstest-runner --report-directory, which causes
the tests to save their tmpdirs persistently. This also means the
result directories didn't match the `/(var/)?tmp` regexp, which broke
the ostree tests in GContinuous.
Fix this by simply asserting that the tmpdir either has `.tmpdir` or
nothing.
Colin Walters [Fri, 19 Feb 2016 20:52:49 +0000 (15:52 -0500)]
contrib/golang: Initial golang bindings
We were considering using this for Docker integration, but we may end
up going a different architectural path. Anyways, it doesn't hurt to
have the bindings in here - they can do a few things.
I decided to fork some of the core code from
https://github.com/dradtke/gotk3 because...well, what we really need a
GIR-based core generator but I didn't want to start on the fully
correct thing until we knew we wanted it, and this was a quick hack.
Also, let's make a `contrib/` directory for things like this.
Colin Walters [Fri, 4 Mar 2016 02:17:53 +0000 (21:17 -0500)]
docs: Add a section on writing buildsystems
And add a test that is a demo buildsystem.
Micah Abbott [Wed, 16 Mar 2016 19:02:18 +0000 (15:02 -0400)]
docs: Cleanup Markdown
I was going through the new version of the docs and noticed a few
problems. Mostly URLs that aren't linked, extra whitespace, and a few
mis-spellings.
I ran the files through `aspell check` and made some manual changes
myself.
These changes were tested locally with `mkdocs serve`
Alexander Larsson [Tue, 15 Mar 2016 12:18:35 +0000 (13:18 +0100)]
rofiles-fuse: Fix permission comparison
We want to allow write if the devinode is in the set,
not the other way around.
https://bugzilla.gnome.org/show_bug.cgi?id=763676
Alexander Larsson [Tue, 15 Mar 2016 11:04:43 +0000 (12:04 +0100)]
repo: Fix the skip-summary-if-summary.sig-is-same cache
This code was always downloading the summary even for a cache hit due
to a missing else.
Giuseppe Scrivano [Fri, 11 Mar 2016 12:04:54 +0000 (13:04 +0100)]
tests: add test for summary file caching
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Fri, 11 Mar 2016 11:59:18 +0000 (12:59 +0100)]
prune: delete all cached summaries files
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Fri, 11 Mar 2016 12:16:04 +0000 (13:16 +0100)]
repo: use the skip summary download optimization for repo_remote_fetch_summary
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Fri, 11 Mar 2016 11:39:32 +0000 (12:39 +0100)]
pull: cache summary and summary.sig
It allows an optimization to skip the download of the summary file
if its .sig file is unchanged.
Downloading the .sig file is much cheaper than downloading the summary
file from repositories with many branches.
https://bugzilla.gnome.org/show_bug.cgi?id=762973
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Fri, 11 Mar 2016 10:36:21 +0000 (11:36 +0100)]
libotutil: new function ot_openat_ignore_enoent
Refactor some common code
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Colin Walters [Wed, 9 Mar 2016 19:07:52 +0000 (14:07 -0500)]
docs: Reference the git docs on references
Colin Walters [Tue, 8 Mar 2016 18:12:00 +0000 (13:12 -0500)]
build: Don't install test data without --enable-installed-tests
Otherwise $(installed_testdir) is empty so we try to put content in
`/`, which I noticed when trying to build an RPM (it works works fine
`sudo make install`).
Colin Walters [Fri, 4 Mar 2016 15:53:47 +0000 (10:53 -0500)]
tests/basic: Fix race in timestamp test
%Z only uses seconds, so it's possible that we did the commit
in the same second, which made this test racy.
- Switch to full nanosecond precision using '%.Y' so it always differs
- Fix the inverted `cmp` usage
- Add a missing `ok`
Colin Walters [Thu, 3 Mar 2016 18:49:54 +0000 (13:49 -0500)]
lib: Add ostree_sysroot_load_if_changed() API
This will allow daemons like rpm-ostree to detect if there are any new
deployments efficiently, in combination with using inotify. If there
are any changes, rpm-ostree wants publish them on DBus.
While we're here, add some changes to start doing unit C testing of
the sysroot API.
Colin Walters [Wed, 2 Mar 2016 15:05:08 +0000 (10:05 -0500)]
tests: Unify some tmpdir code, add ability for C to use libtest.sh
I want to be able to easily test the C API on actual data in an OSTree
repo. The shell `libtest.sh` has code to generate it. Bridge the two
worlds by introducing a little `libostreetest` library which has a C
API which spawns a shell that runs things in `libtest.sh`.
Yes, this is about as beautiful as it sounds, which is to say, it's
not. But it works!
Note while we were here, I realized we were actually now creating
*two* tmpdirs per test in `make check` because the tap driver was
already doing that. Unify it so we know the C code can rely on it.
Colin Walters [Thu, 3 Mar 2016 23:00:54 +0000 (18:00 -0500)]
tests: More TAP fixups
Hopefully getting closer now.
Colin Walters [Thu, 3 Mar 2016 16:39:33 +0000 (11:39 -0500)]
lib: Add ostree_sysroot_init_osname() API, bump mtime
And change the command line to use it. rpm-ostree had a copy
of this code, and thus there's a clear reason to have an API.
While we're moving this into API, ensure the mtime on deploy is bumped
after an osname is created, so that daemons like rpm-ostree can notice
changes. (In reality, creating the directory should do this, but
let's be double sure)
Colin Walters [Thu, 3 Mar 2016 19:20:44 +0000 (14:20 -0500)]
docs/introduction: Note VMs vs baremetal
Colin Walters [Thu, 3 Mar 2016 19:19:10 +0000 (14:19 -0500)]
tests: Convert two more exit 77 instances into TAP-compatible SKIP
Followup to https://github.com/GNOME/ostree/pull/194
Colin Walters [Wed, 2 Mar 2016 21:26:09 +0000 (16:26 -0500)]
deploy: Bump the mtime on ostree/deploy after deployments finish
This allows other processes (e.g. rpm-ostreed) to monitor for external
changes (e.g. if someone does `ostree admin undeploy`) in a relatively
sane fashion.
Specifically, I'm trying to fix:
https://github.com/projectatomic/rpm-ostree/issues/220
Colin Walters [Wed, 2 Mar 2016 15:28:04 +0000 (10:28 -0500)]
tests: Port to glib-tap.mk, make `make check` run all of the tests
OSTree's code for testing predates the `glib-tap.mk` making its
way into GLib. Let's switch to it, as it provides a number
of advantages.
By far the biggest advantage is that `make check` can start to run
most of the tests *in addition* to having them work installed.
This commit keeps the installed tests working, but `make check` turns
out to be really broken because...our TAP usage has bitrotted to say
the least. Fix that all up.
Do some hacks so that the tests work uninstalled as well - in
particular, `glib-tap.mk` and the bits encoded into
`g_test_build_filename()` assume *recursive* Automake (blah). Work
around that by creating a symlink when installed to loop back.
Giuseppe Scrivano [Wed, 2 Mar 2016 09:48:52 +0000 (10:48 +0100)]
refs: Add argument --list to print the full ref name
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Wed, 2 Mar 2016 09:14:23 +0000 (10:14 +0100)]
libostree: Adjust `cleanup_ref_prefix` to use ostree_repo_list_refs_ext
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Mon, 29 Feb 2016 10:23:46 +0000 (11:23 +0100)]
refs: add tests
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Mon, 29 Feb 2016 10:14:59 +0000 (11:14 +0100)]
refs: allow to specify multiple refs as args
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Wed, 2 Mar 2016 08:58:38 +0000 (09:58 +0100)]
ostree-repo: new public function `ostree_repo_list_refs_ext`
It accepts a `flags` argument to control its behavior. Differently
from `ostree_repo_list_refs`, the `refspec_prefix` is not removed from
the results.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Colin Walters [Wed, 2 Mar 2016 15:29:41 +0000 (10:29 -0500)]
Add a missing #include to fix "make check"
Colin Walters [Wed, 2 Mar 2016 02:52:22 +0000 (21:52 -0500)]
repo: Add ostree_repo_get_dfd()
I plan to use this in rpm-ostree at least for two reasons:
- To find the mtime on the repo
- To use the tmp/ directory to stage content (but we should eventually
add a better API)
Colin Walters [Tue, 1 Mar 2016 22:42:59 +0000 (17:42 -0500)]
lib: Introduce versioned symbols
As rpm-ostree evolves, it keeps driving API additions to libostree.
This creates a relatively tight coupling.
However, if delivering via e.g. RPM, unless one manually remembers to
increment the `Requires:` in the spec file, it's possible for the two
to become desynchronized.
RPM handles versioned symbols and will ensure a dependency if the
application starts using a newer version.
To implement this, switch to `-fvisibility=hidden`, along with an
annotation in the header, and finally add a `.sym` file.
This matches what other projects like systemd and libvirt do.
Although rather than attempting to retroactively version symbols, glom
them all onto the current one.
Giuseppe Scrivano [Mon, 29 Feb 2016 13:51:03 +0000 (14:51 +0100)]
test-rofiles-fuse: skip when fusermount is not present
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Mon, 29 Feb 2016 12:23:28 +0000 (13:23 +0100)]
Fix make syntax-check
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Colin Walters [Sat, 27 Feb 2016 16:28:33 +0000 (11:28 -0500)]
docs: Add a blurb on the summary file
We expect people to use it now, so let's actually describe what it is.
Colin Walters [Fri, 26 Feb 2016 16:58:05 +0000 (11:58 -0500)]
Release 2016.3
Colin Walters [Thu, 25 Feb 2016 16:07:30 +0000 (11:07 -0500)]
deltas: Add a compression size heuristic for endianness detection
I see when analyzing a delta here that due to byteswapping a negative
compression ratio of 540%, 66%, and 28%. Let's arbitrarily pick 20%
as a threshold for detecting byetswapping.
Colin Walters [Wed, 24 Feb 2016 22:04:04 +0000 (17:04 -0500)]
deltas: Heuristically detect endianness for older deltas
If the average object size is greater than 4GiB, let's assume we're
dealing with opposite endianness. I'm fairly confident no one is
going to be shipping peta- or exa- byte size ostree deltas, period.
Past the gigabyte scale you really want bittorrent or something.
Colin Walters [Wed, 24 Feb 2016 19:29:56 +0000 (14:29 -0500)]
deltas: Use endianness marker when parsing
Extend the `static-delta show` and `pull` commands to use the
endianness information (if available).
Colin Walters [Tue, 23 Feb 2016 16:00:18 +0000 (11:00 -0500)]
deltas: Include an endianness marker
We screwed up and had delta integers use host endianness. Start
digging out by at least annotating the endianness.
https://bugzilla.gnome.org/show_bug.cgi?id=762515
Alexander Larsson [Wed, 24 Feb 2016 11:14:38 +0000 (12:14 +0100)]
rofiles-fuse: Handle operations on the root
ENSURE_RELPATH breaks when path is "/". In that case we need
to return "." instead of "".
https://bugzilla.gnome.org/show_bug.cgi?id=762596
Alexander Larsson [Wed, 24 Feb 2016 14:17:46 +0000 (15:17 +0100)]
deltas: Fix regression in ostree_repo_static_delta_execute_offline
xdg-app passed this a filename directly, and in this case it should be
used as is. This regressed to always look for "superblock" in the same
directory as the passed in filename.
https://bugzilla.gnome.org/show_bug.cgi?id=762617
Colin Walters [Tue, 23 Feb 2016 03:07:02 +0000 (22:07 -0500)]
deltas: Fix some more 32 bit warnings
Colin Walters [Tue, 23 Feb 2016 02:11:10 +0000 (21:11 -0500)]
lib: Two more compiler warning fixes
Colin Walters [Tue, 23 Feb 2016 01:52:33 +0000 (20:52 -0500)]
libarchive: Fix a 32 bit format warning
This is actually an error by default with our default CFLAGS.
Colin Walters [Mon, 22 Feb 2016 23:08:01 +0000 (18:08 -0500)]
Release 2016.2
Colin Walters [Mon, 22 Feb 2016 21:50:28 +0000 (16:50 -0500)]
gpg: Use gpg_strerror_r for threadsafety
These APIs are rather painful...this is why GError exists.
Alexander Larsson [Mon, 22 Feb 2016 20:04:38 +0000 (15:04 -0500)]
build: Use threadsafe GPGME
https://bugzilla.gnome.org/show_bug.cgi?id=761863
Colin Walters [Mon, 22 Feb 2016 16:18:30 +0000 (11:18 -0500)]
libarchive: Make autocreate_parents imply autocreating root dir
Some Docker layers are just metadata in the `layer.json`. If one is
mapping Docker layers to OSTree commits, one needs to create a dummy
root directory, because OSTree doesn't support metadata-only commits.
Let's just push that logic down here because it's easier than special
casing it in higher levels.
Colin Walters [Mon, 22 Feb 2016 19:06:20 +0000 (14:06 -0500)]
docs: Add a new formats section, move static deltas in there
The `src/libostree/README-deltas.md` was rather hidden - let's move
this into the manual.
Joaquim Rocha [Mon, 22 Feb 2016 14:02:47 +0000 (15:02 +0100)]
build: Link ostree with libarchive
libarchive (when available) is being used in ot-builtin-export.c so it
is necessary to link ostree with it.
https://bugzilla.gnome.org/show_bug.cgi?id=762457
Colin Walters [Fri, 19 Feb 2016 17:28:07 +0000 (12:28 -0500)]
pull: Add a --dry-run option for static deltas
One of the design goals with deltas was not just wire efficiency,
but also having all the data up front about how much data would
be transferred before starting.
Let's expose that better by adding a `dry-run` option to the pull API.
This requires static deltas to be useful. Basically we simply call
the progress callback once with the data from the superblock.
Colin Walters [Fri, 19 Feb 2016 13:43:35 +0000 (08:43 -0500)]
pull: Add require-static-deltas pull option
For a production release repository, most OS vendors would want
to just always use static deltas. Add the ability for the pulls to
require it.
(I think I'll also add a summary key for this actually in addition,
so the repo manager can force it too)
Jonathan Lebon [Fri, 19 Feb 2016 16:58:08 +0000 (11:58 -0500)]
ostree-sysroot: add debug option to help testing
If ostree is run in a test setup where it operates as root in a tmp
directory, it might cause issues to flag the deployments as immutable.
The test harness might simply be doing an `rm -rf` (effectively the case
for gnome-desktop-testing-runner), which will then fail.
We add a new debug option to the ostree_sysroot object using GLib's
GDebugKey functionality to allow our tests to communicate to ostree that
we don't want immutable deployments.
Colin Walters [Thu, 18 Feb 2016 21:49:30 +0000 (16:49 -0500)]
repo: Add ostree_repo_import_archive_to_mtree
This is a more flexible version of the previous
ostree_repo_write_archive_to_mtree() which took a file reference.
This has an extensible options structure, and in particular
now supports `ignore_unsupported_content`.
I plan to use this for importing Docker images which contain device
nodes. (There's no reason for container images to have those, so
we'll just ignore them).
Also here, just like the export variant, the caller is responsible for
setting up libarchive.
Colin Walters [Thu, 18 Feb 2016 16:25:57 +0000 (11:25 -0500)]
Rename libarchive write API to "export", matching command line
I was going to add new API for importing, and it was really confusing
that what I think of now as import and export both had "write" in the
name. It's just clearer to talk about the direction.
At the same time, include `Export` in the options structure.
This isn't an ABI break as the API isn't in a release.
Colin Walters [Thu, 18 Feb 2016 23:21:32 +0000 (18:21 -0500)]
manual: Note that the bare-user mode exists
Colin Walters [Wed, 17 Feb 2016 16:01:21 +0000 (11:01 -0500)]
rofiles-fuse: Fix truncate call to not use O_CREAT
I was getting a compilation error with the GCC hardening flags which
look for a missing mode with `O_CREAT`. The right fix here is to drop
`O_CREAT`, as truncate() should throw `ENOENT` if the file doesn't
exist.
Colin Walters [Wed, 17 Feb 2016 15:37:08 +0000 (10:37 -0500)]
packaging: Add a fuse subpackage
For rofiles-fuse. Eventually what we should really do is split out
the shared library from the binaries? A minimal system shouldn't need
rofiles-fuse, it's mainly for doing layered packages and that sort of
thing.
Colin Walters [Sun, 14 Feb 2016 16:57:59 +0000 (11:57 -0500)]
Support Docker-style whiteouts
This is to enable importing Docker layers as ostree commits, then
checking them out in a union.
The prototype work for this is in:
https://github.com/cgwalters/dlayer-ostree
Though it will likely ultimately end up in:
https://github.com/projectatomic/atomic
Colin Walters [Mon, 15 Feb 2016 11:39:49 +0000 (06:39 -0500)]
man/ostree-export.xml: Add to git
Forgot to `git add`.
Colin Walters [Fri, 12 Feb 2016 17:41:15 +0000 (12:41 -0500)]
manual-tests: New static-delta-generate-crosscheck.sh
I wanted to test static deltas vs a repo with "real" content
in it from Fedora Atomic.
Colin Walters [Thu, 11 Feb 2016 18:28:03 +0000 (13:28 -0500)]
pull: Support specifying exact commit to pull via branch@commit
I don't know why we didn't do this a long time ago. This extends the
pull API to allow grabbing a specific commit, and will set the branch
to it. There's some support for this in the deploy engine, but there
are a lot of reasons to support it for raw pulls (such as subset
mirroring cases).
In fact I'm thinking we should also have the override-version logic
here too.
NOTE: One thing I debated here is inventing a new syntax on the
command line. Git doesn't seem to have this functionality (probably
because it'd be rarely used). The '@' character at least doesn't
conflict with anything.
Anyways, I wanted this for some other test cases. Without this,
writing tests that go between different commits is more awkward as one
must generate the content in one repo, then pull downstream, then
generate more content, then pull again. But now I can just keep track
of commit IDs and do exactly what I want without synchronizing the
tests.
Colin Walters [Thu, 28 Jan 2016 19:41:27 +0000 (14:41 -0500)]
Add an `export` builtin, and API to write to libarchive
At the moment I'm looking at using rpm-ostree to manage RPM inputs
which can then be converted into Docker images. It's most convenient
if we can stream directly out of libostree rather than doing a
checkout + tar combination.
There are also backup/debugging etc. reasons to implement `export` as
well.
Colin Walters [Wed, 10 Feb 2016 11:42:54 +0000 (12:42 +0100)]
Import rofiles-fuse
While it's not strictly tied to OSTree, let's move
https://github.com/cgwalters/rofiles-fuse in here because:
- It's *very* useful in concert with OSTree
- It's tiny
- We can reuse OSTree's test, documentation, etc. infrastructure
One thing to consider also is that at some point we could experiment
with writing a FUSE filesystem for OSTree. This could internalize a
better equivalent of `--link-checkout-speedup`, but on the other hand,
the cost of walking filesystem trees for these types of operations is
really quite small.
But if we did decide to do more FUSE things in OSTree, this is a step
towards that too.
Matthew Barnes [Tue, 9 Feb 2016 00:58:17 +0000 (00:58 +0000)]
fetcher: Fix hung GTlsInteraction
The GTlsInteraction instance must be created in the session thread
so it uses the correct GMainContext.
Colin Walters [Sat, 6 Feb 2016 16:04:53 +0000 (17:04 +0100)]
lib: Expand `ostree static-delta show` to show part stats
Now we display stats on the individual parts, such as the blob size
and the number of each type of opcode. Most interesting to me is
things like how many bsdiff opcodes there are vs new objects, etc.
Colin Walters [Sat, 6 Feb 2016 12:56:19 +0000 (13:56 +0100)]
lib: Create an internal static delta parsing/opening function
We had code to deal with opening/checksumming/decompressing static
deltas in a few places. I'd like to teach `ostree static-delta show`
how to display more information, and this will allow it to just use
`_ostree_static_delta_part_open()` too.
Colin Walters [Wed, 27 Jan 2016 16:06:30 +0000 (11:06 -0500)]
build: Remove --disable-static-deltas option
I'm confident now we can declare them stable.
Colin Walters [Mon, 8 Feb 2016 13:35:09 +0000 (14:35 +0100)]
README.md: Update to link to Read The Docs, describe a bit better
Colin Walters [Mon, 8 Feb 2016 13:24:24 +0000 (14:24 +0100)]
docs-md: Delete (obsoleted by docs/)
This was just a prototype start at markdown docs that I never picked
back up. Now that we have the Markdown/mkdocs done, delete this.
Giuseppe Scrivano [Fri, 29 Jan 2016 10:02:17 +0000 (11:02 +0100)]
build: 'make clean' removes parse-datetime.c
and fix make dist while at it.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Colin Walters [Wed, 3 Feb 2016 15:22:01 +0000 (10:22 -0500)]
packaging: Sync spec file with Fedora
Colin Walters [Thu, 28 Jan 2016 03:02:36 +0000 (22:02 -0500)]
static-delta: Add `show` subcommand
Right now though, almost all of the details of deltas are private, so
we can't do the "honest thing" and have the command line just use the
shared library.
Eventually some of this should appear in the API, but for now add
command line which is useful for debugging.
Colin Walters [Thu, 28 Jan 2016 20:34:38 +0000 (15:34 -0500)]
build: Hoist man conditional higher
So we actually build with `--disable-man`.
Colin Walters [Thu, 28 Jan 2016 19:53:38 +0000 (14:53 -0500)]
lib: Add a #define OSTREE_SHA256_DIGEST_LEN 32
And use it internally. This way it's a bit less magical.
Colin Walters [Thu, 28 Jan 2016 20:22:10 +0000 (15:22 -0500)]
build: Add --disable-man
Gnome Continuous doesn't have docbook, so copy what we do for glib.
Colin Walters [Wed, 27 Jan 2016 02:34:31 +0000 (21:34 -0500)]
repo: Port -refs.c to openat()
I'd like to incrementally convert all of `ostree-repo*.c` to
fd-relative usage, so that we can sanely introduce
`ostree_repo_new_at()` which doesn't involve GFile.
This one is medium risk, but passes the test suite.
Colin Walters [Thu, 28 Jan 2016 14:30:16 +0000 (09:30 -0500)]
apidoc: Remove unnecessary srcdir != builddir workaround
It seems to be fine with `gtk-doc-1.19-3.el7.noarch`, so let's drop
this workaround, as it causes `make` warnings.
Colin Walters [Wed, 27 Jan 2016 21:56:16 +0000 (16:56 -0500)]
Rewrite manual in mkdocs
I don't much like Docbook (and am considering converting the man pages
too), but let's start with the manual.
I looked at various documentation generators (there are a lot), and
I had a few requirements:
- Markdown
- Packaged in Fedora
- Suitable for upload to a static webserver
`mkdocs` seems to fit the bill.
Colin Walters [Wed, 27 Jan 2016 18:29:21 +0000 (13:29 -0500)]
build: Rename doc/ -> apidoc/
This is preparation for introducing a `mkdocs` manual under `doc/`
which should be significantly more useful for the world at large than
the minimal manual that exists there now.
Colin Walters [Wed, 27 Jan 2016 17:51:07 +0000 (12:51 -0500)]
build: Move man pages into man/
This is preparation for having 3 separate doc build systems (whee):
- xsltproc for the man pages
- gtk-doc for the API docs
- mkdocs for a real manual
Colin Walters [Wed, 27 Jan 2016 16:44:10 +0000 (11:44 -0500)]
tests: Use "bash strict mode"
I noticed in the static deltas tests, there were some tests that
should have been under `-o pipefail` to ensure we properly propagate
errors.
There were a few places where we were referencing undefined variables.
Overall, this is clearly a good idea IMO.
Colin Walters [Wed, 27 Jan 2016 15:43:57 +0000 (10:43 -0500)]
grub2: Don't delete grub2.cfg.old file we just copied
The original intention here was that we'd keey around a copy of the
file so that grub2 could eventually learn how to do atomic updates by
checking for a "fully written" marker in the *new* file, and if it
didn't exist, falling back to grub2.cfg.old.
I haven't yet proposed that upstream, but we might as well stop
deleting the file since it's useful as a backup at least.
Reported-by: Gatis Paeglis
Colin Walters [Tue, 26 Jan 2016 21:48:37 +0000 (16:48 -0500)]
refs: Add a missing `goto out` for error handling
If the `refs/remotes` directory doesn't exist, we'd trip an assertion.
Colin Walters [Sat, 23 Jan 2016 20:07:55 +0000 (15:07 -0500)]
Add a checkout option to skip fsync
This is a better followup to
dc9239dd7b09ef5e104309b4dbf0e136889da274
since I wanted to do fsync-less checkouts in rpm-ostree too, and
replicating the "turn off fsync temporarily" was in retrospect just a
hack.
We can simply add a boolean to the checkout options.
https://github.com/GNOME/ostree/pull/172
Giuseppe Scrivano [Fri, 15 Jan 2016 09:24:08 +0000 (10:24 +0100)]
diff: do not traverse parent commits
The object count displayed included also the number of parent
commits.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Colin Walters [Wed, 13 Jan 2016 15:15:21 +0000 (10:15 -0500)]
sysroot: Don't individually fsync dirs in checkout, rely on syncfs
Originally, a lot of the `fsync()` calls here were added for the
wrong reason - I was chasing a bug that ended up being the extlinux
bootloader not parsing 64 bit ext4 filesystems. But since it looked
like corruption, I tried adding a lot more `fsync()` calls.
All we should have to do is use `syncfs()`. If that doesn't work,
it's a kernel bug.
I'm making this change because skipping the individual fsyncs can be a
major performance win - it's easier for the FS to optimize, we do more
in parallel, etc.
https://bugzilla.gnome.org/show_bug.cgi?id=757117